#ifndef RENDERBUFFEROBJECT_H
#define RENDERBUFFEROBJECT_H

#include "bga/graphics/GLObject.h"

/**
 * \namespace bga
 * \brief API namespace
 */
namespace bga
{

/*! \class RenderBufferObject
*   \brief Class which contains OpenGL RBO operations
*/
class BOARD_HELL_ENGINE RenderBufferObject : public GLObject
{
    public:
        RenderBufferObject();

        virtual ~RenderBufferObject();

        /*!
         * \brief Bind the RBO
         */
        virtual void bind() const;

        /*!
         * \brief Unbind the RBO
         */
        virtual void unbind() const;

        /*!
         * \brief allocate RBO
         */
        void allocateBuffer() const;

        void setInternalFormat(GLenum internalFormat);
        GLenum getInternalFormat() const;

        void setWidth(GLsizei width);
        GLsizei getWidth() const;

        void setHeight(GLsizei height);
        GLsizei getHeight() const;

    private:
        virtual GLuint generate() const;

    private:
        GLenum internalFormat;

        GLsizei width;
        GLsizei height;
};

}

#endif // RENDERBUFFEROBJECT_H
